home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 2: Applications
/
Linux Cubed Series 2 - Applications.iso
/
circuits
/
irsim-ca.2
/
irsim-ca
/
irsim-cap-9.2
/
src
/
other
/
h2a
/
Nsubrs.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-02-25
|
609b
|
35 lines
#define Index2node INDEX2NODE
#include "nsubrs.c"
#undef Index2node
nptr Index2node( index )
Ulong index;
{
nptr n = INDEX2NODE( index );
if( n == NULL )
{
static nptr node = NULL;
static char buff[30];
register Uint ma, mi;
ma = index & ((1 << NBIT_HASH) - 1);
mi = index >> NBIT_HASH;
(void) sprintf( buff, "<%d,%d>", ma, mi );
if( node == NULL )
node = GetNewNode( "?" );
if( do_sort )
{
node->nname = Valloc( strlen( buff ) + 1, 1 );
(void) strcpy( node->nname, buff );
}
else
node->nname = buff;
n = node;
}
return( n );
}